package com.example.work4.http.imp

import com.example.work4.http.body.MomentSelectBody
import com.example.work4.http.body.po.ChatInfoPage
import com.example.work4.http.data.MomentPageData
import com.example.work4.po.Message
import com.example.work4.po.ResultBean
import retrofit2.Call
import retrofit2.http.Body
import retrofit2.http.Header
import retrofit2.http.POST
import retrofit2.http.Query

interface MessageRetrofit {

    @POST("/api/message/list")
    fun messageList(
        @Header("Authorization") token:String,
    ): Call<ResultBean<List<ChatInfoPage>>>

    @POST("/api/message/get")
    fun get(
        @Header("Authorization") token:String,
        @Query(value = "receiverId")receiverId:Int
    ): Call<ResultBean<List<Message>>>

    @POST("/api/message/send")
    fun send(
        @Header("Authorization") token:String,
        @Body body: Message
    ): Call<ResultBean<Int>>

}